/*
 * Copyright (C) hushenglan
 */

#ifndef _MYSYS_WORK_PROCESS_H_
#define _MYSYS_WORK_PROCESS_H_

namespace mysys
{

/*
 * 参数结构体
 */
typedef struct work_process_arg_s work_process_arg_t;
struct work_process_arg_s
{
    int listenPort;
    CServerSock *serverSock;
};

class CWorkProcess: public CProcess
{
public:

    /*
     * 构造函数
     */
    CWorkProcess();

    /*
     * 析构函数
     */
    virtual ~CWorkProcess();

    /*
     * work进程main函数
     */
    int workProcessMain(void *args);

    /*
     * work进程退出时的动作
     */
    void workProcessAtexit(void);

private:

    bool _isNeedWork;
};

}

#endif
